package quartz;

import org.quartz.*;

import java.time.LocalDateTime;

/**
 * <h1></h1>
 *
 * @author zhh 2019-06-03
 */
public class HelloJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        System.out.println("Current Exec Time is: " + LocalDateTime.now());
        Trigger trigger = jobExecutionContext.getTrigger();
        System.out.println("start time is:" + trigger.getStartTime());
        System.out.println("end time is:" + trigger.getEndTime());
        JobKey jobKey = trigger.getJobKey();
        System.out.println("jobKey info = [jobName:" + jobKey.getName() + ", jobGroup:" + jobKey.getGroup() + "]");
    }
}
